# from selenium import webdriver
# from selenium.webdriver.common.by import By
# from time import sleep
# driver = webdriver.Edge()
# driver.get('https://www.baidu.com/')
import time


# from selenium import webdriver
# from selenium.webdriver.common.by import By
# from time import sleep

from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

driver=webdriver.Edge()
driver.get('https://www.jiuxian.com/')
time.sleep(3)
#点击登录
driver.find_element(By.XPATH,'/html/body/div[2]/div/div[1]/div/a[1]').click()
time.sleep(3)
#点击QQ
driver.find_element(By.XPATH,'//*[@id="loginform"]/div/div/div/div/div[1]/div[4]/div/a[1]/i').click()
time.sleep(3)

#框架
driver.find_element(By.ID,'//*[@id="ptlogin_iframe"]')
time.sleep(10)

#点击密码登录
driver.find_element(By.CLASS_NAME,'link').click()
time.sleep(3)

#框架
driver.find_element(By.NAME,'ptlogin_iframe')
time.sleep(3)

#输入框输入账号
driver.find_element(By.CLASS_NAME,'input_tips').send_keys('123456')
time.sleep(5)

#点击登录
# driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a').click()
# time.sleep(2)
# #使用输入框输入名称
# driver.find_element(By.NAME,'username').send_keys('13811033962')
# time.sleep(2)
# #输入密码
# driver.find_element(By.NAME,'password').send_keys('123456')
# time.sleep(10)
# #点击登录
# driver.find_element(By.CLASS_NAME,'finish-btn').click()
# time.sleep(3)
# #断言
# dy1=driver.find_element(By.XPATH,'').text
# print(dy1)
# #点击搜索框
# driver.find_element(By.XPATH,'').send_keys('音乐耳机')
# time.sleep(2)
#
# driver.find_element(By.CSS_SELECTOR,'search-input-btn').click()
# time.sleep(2)
#高级定位
# driver.find_element(By.XPATH,'//a[starts-with(@id,"buy-cart")]').click()
# time.sleep(3)
# driver.find_element(By.XPATH,'//a[@id="buy-cart"and@class="shop-btn"]').click()
# driver.find_element(By.XPATH,'//a[contains(@id,"buy-cart")]').click()



